﻿using System;
using System.Windows.Controls;
using ESRI.ArcGIS.Client;
using QDP.Platform.Services;
using Services.Maps;

namespace Apps.Maps
{
    public partial class MaplayerController : UserControl
    {
        protected IMapService mapService
        {
            get 
            { 
                return ServiceLoader.Load<IMapService>();
            }
        }
        protected Map ActiveMap
        {
            get
            {
                return mapService.CurrentMap;
            }
        }
        public MaplayerController()
        {
            InitializeComponent();
        }
        private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            if (mapService == null) return;
            listView.ItemsSource = ActiveMap.Layers;
        }
    }
}